package cn.tude._05mvcboot04.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class ArticleDTO {
    @ApiModelProperty(value = "标题",required = true,example = "神话")
    @Pattern(regexp = "[\\u4e00-\\u9fa5]{3,20}",message = "标题应该是3~20个汉字")
    private String title;
    @ApiModelProperty(value = "内容",required = true, example = "神话内容")
    @NotBlank(message = "内容不能为 空 或 空白 或 空字符串")
    private String content;
}
